namespace RayDen.RayEngine {
    public class ImageFilm<TPath> : ImageFilmBase
        where TPath: PathSamplerBase {


        public ImageFilm(int width, int height)
            : base(width, height) {
        }

        public override void Consume(PathSamplerBase pt) {
            var path = (TPath)pt;
            this.Samples.SplatSample(path.Sample, path.Radiance, 1.0f);
            // Check if the sample buffer is full
            if (this.Samples.IsFull()) {
                this.statsTotalSampleCount += this.Samples.GetSampleCount();
                    // Splat all samples on the film
                this.SplatSampleBuffer(this.IsPreviewOver(), this.Samples);
                this.Samples = this.GetFreeSampleBuffer();
            }
        }

    }
}